<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <p>{{counter}}</p>
      <p k-text="counter"></p>
      <p k-html="desc" @click="add"></p>
      <input type="text" k-model="desc" />
    </div>
    <script src="./kvue.js"></script>
    <script>
      const app = new KVue({
        el: "#app",
        // 添加对data的响应式处理
        data: {
          counter: 1,
          desc: `<span style='color:red;'>click add counter</span>`,
        },
        methods: {
          add() {
            this.counter++;
          },
        },
      });
      // setInterval(() => {
      //   // console.log(11);
      //   app.counter++;
      // }, 1000);
    </script>
  </body>
</html>
